/*
 * EnemyFactory.cpp
 *
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses 
 */

#include "EnemyFactory.h"
#include "GreenZombie.h"
#include "BlueZombie.h"
#include "RedZombie.h"

Enemy* EnemyFactory::createEnemy(ModelObject type, int spawning_x, int spawning_y) {
    if (type == ZOMBIE_GREEN) {
        return new GreenZombie(spawning_x, spawning_y);
    } else if (type == ZOMBIE_BLUE) {
        return new BlueZombie(spawning_x, spawning_y);
    } else if (type == ZOMBIE_RED) {
        return new RedZombie(spawning_x, spawning_y);
    }
    return 0;
}

Enemy* EnemyFactory::createEnemy(ModelObject type, int id, int spawning_x, int spawning_y) {
    if (type == ZOMBIE_GREEN) {
        return new GreenZombie(id, spawning_x, spawning_y);
    } else if (type == ZOMBIE_BLUE) {
        return new BlueZombie(id, spawning_x, spawning_y);
    } else if (type == ZOMBIE_RED) {
        return new RedZombie(id, spawning_x, spawning_y);
    }
    return 0;
}
